Many computers that utilize a virtual machine (VM) include a managed code portion and a native code portion. The VM allows a user application to run on different platforms (i.e., interface with multiple operating systems). In computer systems that run a VM, native resources are allocated as an effect of a user interface (UI) library code.
UI controls are displayed on a computer display such as a monitor or a flat panel display, and allow a user to interface with the computers. Examples of the UI controls are menus, commands, lists, trees, control tables, etc. It is common for code developers (and therefore users) to neglect the considerable number of signal commands normally associated with managing UI controls in view of the processor and memory capabilities of many current computers.
UI controls typically include multiple control nodes or control items that may be associated with each other either in hierarchical form (where one control is the parent of another control), in tabular form (where multiple controls are associated in a table format), in list form, or in some other associated form. Examples of UI controls that can be hierarchically associated include trees, commands, and menus. In current VM systems, native resources can be allocated in both native code portions and managed code portions to realize these UI controls. Present UI controls can produce, realize, and save multiple concurrently-saved copies. For example, as the UI control is transferred among the managed code portion, the native code portion, and the OS itself, a copy of each UI control is often stored in memory locations of each respective memory portion. These native code resources must synchronize with their managed code counterpart in the managed code portion or else inconsistencies can exist between the different copies of the UI control. Executing code in managed code necessitates that the UI controls in the native code are synchronized with their counterparts in the managed code. Synchronization between the managed code and the native code has to be frequently performed to decrease any difference between the code describing the UI controls.
The code transitions typically necessary for system calls between the native code portion and the managed code portion of VMs, however, become strained in resource constrained devices. This strain exists especially for resource-demanding tasks, such as UI control realization. Examples of resource constrained devices are PDAs, cell phones, embedded devices, etc. that rely on more limited software and operating systems than those applied to full size computers that allow the resource constrained devices to operate quickly and accurately. It would thus be beneficial to provide a way to decrease the number of system calls between the native code portion and the managed code portion.